<?php

use Illuminate\Routing\Router;

Route::group([
    'prefix' => 'admin/circle',
    'namespace' => 'Frieza\\Modules\\Circle\\Controllers',
    'middleware' => [
        'web',
        'admin'
    ],
], function (Router $router) {

    // 种子用户白名单
    $router->get('/whitelist', 'WhiteListController@index');
    $router->post('/whitelist/save', 'WhiteListController@save');

    // 圈子流量管理
    $router->get('/proportion/edit', 'CircleProportionController@edit');
    $router->post('/proportion/save', 'CircleProportionController@save');

    //内容管理
    $router->get('photos/list', 'PhotosCircleController@index');
    //置顶和加精
    $router->post('photos/operation/{id}', 'PhotosCircleController@operation');
    //折叠
    $router->post('/photos/show-status/{id}', 'PhotosCircleController@showStatus');

    // 圈子管理
    $router->get('/', 'CircleBaseController@index');
    $router->get('/create', 'CircleBaseController@create');
    $router->get('{circle_id}/edit', 'CircleBaseController@create');
    $router->post('/save', 'CircleBaseController@save');
    $router->post('/sort', 'CircleBaseController@sort');

    //圈子成员管理
    $router->get('/user/{circle_id}', 'CircleUserController@checkUser');
    $router->delete('/user/{circle_id}/{id}', 'CircleUserController@deleteUser');
    $router->post('/user/{circle_id}', 'CircleUserController@addUser');

    //设置圈委
    $router->get('/addCommittee/{circle_id}/{uid}', 'CircleUserController@addCommittee');
    $router->get('/delCommittee/{circle_id}/{uid}', 'CircleUserController@delCommittee');

    $router->get('black', 'CircleBlackController@index');
    $router->post('changeBlack', 'CircleBlackController@changeBlack');

    //圈子操作通知
    $router->get('operation', 'CircleOperationLogController@index');

    //圈子详情页的Tab
    $router->get('tab/{circle_id}', 'CircleTabController@index');
    $router->delete('tab/{circle_id}/{id}', 'CircleTabController@del');
    //圈子详情页的Tab的创建
    $router->get('tab/{circle_id}/create', 'CircleTabController@create');
    $router->post('tab/save', 'CircleTabController@save');
});